﻿using Dsl.Ped.Desktop.Modules.ErrorViewer;
using Dsl.Ped.Framework.Messages;
using NUnit.Framework;

namespace DSLPedDesktopTest.Modules.ErrorViewer
{
    [TestFixture]
    [RequiresSTA]
    public class ErrorViewerViewModelTest
    {
#if DEBUG
        
        [Test]
        public void CheckMessageTest1()
        {
            var errorViewerView = new ErrorViewerViewModel();
            var result = errorViewerView.CheckMessage(
                new NotifyMessage(this, "ABCDE", "TEST", NotifyType.Error), true, true, true);
            Assert.AreEqual(true, result);
        }

        [Test]
        public void CheckMessageTest2()
        {
            var errorViewerView = new ErrorViewerViewModel();
            var result = errorViewerView.CheckMessage(
                new NotifyMessage(this, "ABCDE", "TEST", NotifyType.Error), false, true, true);
            Assert.AreEqual(false, result);
        }

        [Test]
        public void CheckMessageTest3()
        {
            var errorViewerView = new ErrorViewerViewModel();
            var result = errorViewerView.CheckMessage(
                new NotifyMessage(this, "ABCDE", "TEST", NotifyType.Info), true, true, true);
            Assert.AreEqual(true, result);
        }

        [Test]
        public void CheckMessageTest4()
        {
            var errorViewerView = new ErrorViewerViewModel();
            var result = errorViewerView.CheckMessage(
                new NotifyMessage(this, "ABCDE", "TEST", NotifyType.Info), true, false, true);
            Assert.AreEqual(false, result);
        }

        [Test]
        public void CheckMessageTest5()
        {
            var errorViewerView = new ErrorViewerViewModel();
            var result = errorViewerView.CheckMessage(
                new NotifyMessage(this, "ABCDE", "TEST", NotifyType.Warning), true, true, true);
            Assert.AreEqual(true, result);
        }

        [Test]
        public void CheckMessageTest6()
        {
            var errorViewerView = new ErrorViewerViewModel();
            var result = errorViewerView.CheckMessage(
                new NotifyMessage(this, "ABCDE", "TEST", NotifyType.Warning), true, false, false);
            Assert.AreEqual(false, result);
        }

#endif
    }
}
